<template>
  <div class="catgory">
    <h3>{{ title }}分类</h3>
    <!-- 为 slot 传递数据 将数据传递给插槽的使用者 可以传递多个数据-->
    <slot :games="games" hello="slot">我是默认内容</slot>
  </div>
</template>

<script>
export default {
  name: "Category",
  props: ["title"],
  data() {
    return {
      games: ["LOL", "王者荣耀", "DNF", "绝地求生"],
    };
  },
};
</script>
<style scoped>
.catgory {
  background-color: skyblue;
  width: 200px;
  height: 300px;
}
h3 {
  background-color: orange;
  text-align: center;
}
img {
  width: 100%;
  height: 150px;
}
</style>
